package com.yay.warehouse.model;

import com.yay.warehouse.R;


/**
 * Get Started!
 * @author yakovlev.yuriy@gmail.com
 * @author Dmitry Makeev
 */
public enum Category {
    Documents(R.string.documents, 0, R.drawable.documents),
    Keys(R.string.keys, 1, R.drawable.keys),
    Luggage(R.string.luggage, 2, R.drawable.luggage),
    Phone(R.string.phone, 3, R.drawable.phone),
    Jewel(R.string.jewel, 4, R.drawable.jewel),
    Animal(R.string.animal, 5, R.drawable.animal),
    Person(R.string.person, 6, R.drawable.person),
    Other(R.string.other, 7, R.drawable.other);

    
	public static Category findById(int id) {
		Category ret = Documents;
		for(Category cat : values()) {
			if(cat.getId() == id) {
				return cat;
			}
		}
		return ret;
	}

	public int getName() {
		return name;
	}

	public int getId() {
		return id;
	}
	
	public int getDrawable() {
		return drawable;
	}

	
	private int name;
	private int id;
	private int drawable;
	
	private Category(int name, int id, int drawable) {
		this.name = name;
		this.id = id;
		this.drawable = drawable;
	}

}
